﻿using System.Collections.Generic;
namespace Globalization
{
    public enum HolidayType
    {
        Persian,
        Hijri,
    }

    public class Holiday
    {
        public HolidayType Type { get; private set; }
        public int Month { get; private set; }
        public int Day { get; private set; }
        public string Description { get; private set; }

        public Holiday(HolidayType type, int month, int day, string description)
        {
            Type = type;
            Month = month;
            Day = day;
            Description = description;
        }
    }

    public class Holidays
    {
        static Holidays myInstance = null;
        List<Holiday> holidays = new List<Holiday>();

        private Holidays()
        {
            holidays.Add(new Holiday(HolidayType.Persian, 1, 1, "نوروز"));
            holidays.Add(new Holiday(HolidayType.Persian, 1, 2, "نوروز"));
            holidays.Add(new Holiday(HolidayType.Persian, 1, 3, "نوروز"));
            holidays.Add(new Holiday(HolidayType.Persian, 1, 4, "نوروز"));
            holidays.Add(new Holiday(HolidayType.Persian, 1, 12, "روز جمهوری اسلامی"));
            holidays.Add(new Holiday(HolidayType.Persian, 1, 13, "روز طبیعت"));
            holidays.Add(new Holiday(HolidayType.Persian, 3, 14, "درگذشت آیت‌الله خمینی"));
            holidays.Add(new Holiday(HolidayType.Persian, 3, 15, "قیام پانزده خرداد"));
            holidays.Add(new Holiday(HolidayType.Persian, 11, 22, "پیروزی انقلاب اسلامی"));
            holidays.Add(new Holiday(HolidayType.Persian, 12, 29, "ملی شدن صنعت نفت"));

            holidays.Add(new Holiday(HolidayType.Hijri, 1, 9, "عاشورای حسینی"));
            holidays.Add(new Holiday(HolidayType.Hijri, 1, 10, "تاسوعای حسینی"));
            holidays.Add(new Holiday(HolidayType.Hijri, 2, 20, "اربعین حسینی"));
            holidays.Add(new Holiday(HolidayType.Hijri, 2, 28, "رحلت پیامبر اکرم و امام حسن مجتبی"));
            holidays.Add(new Holiday(HolidayType.Hijri, 2, 29, "شهادت امام رضا"));
            holidays.Add(new Holiday(HolidayType.Hijri, 3, 17, "میلاد پیامبر اکرم و امام جعفر صادق"));
            holidays.Add(new Holiday(HolidayType.Hijri, 6, 3, "شهادت حضرت فاطمه الزهرا"));
            holidays.Add(new Holiday(HolidayType.Hijri, 7, 13, "میلاد امام علی"));
            holidays.Add(new Holiday(HolidayType.Hijri, 7, 27, "مبعث پیامبر اکرم"));
            holidays.Add(new Holiday(HolidayType.Hijri, 8, 15, "میلاد امام زمان"));
            holidays.Add(new Holiday(HolidayType.Hijri, 9, 21, "شهادت امام علی"));
            holidays.Add(new Holiday(HolidayType.Hijri, 10, 1, "عید فطر"));
            holidays.Add(new Holiday(HolidayType.Hijri, 10, 2, "عید فطر"));
            holidays.Add(new Holiday(HolidayType.Hijri, 10, 25, "شهادت امام جعفر صادق"));
            holidays.Add(new Holiday(HolidayType.Hijri, 12, 10, "عید قربان"));
            holidays.Add(new Holiday(HolidayType.Hijri, 12, 18, "عید غدیر"));
        }

        public static List<Holiday> getHolidays()
        {
            if (myInstance == null)
                myInstance = new Holidays();
            return myInstance.holidays;
        }
    }
}